3.1230 \(\int (a+b x) (a c-b c x)^n \, dx\)

Optimal. Leaf size=53 \[ \frac{(a c-b c x)^{n+2}}{b c^2 (n+2)}-\frac{2 a (a c-b c x)^{n+1}}{b c (n+1)} \]

[Out]

(-2*a*(a*c - b*c*x)^(1 + n))/(b*c*(1 + n)) + (a*c - b*c*x)^(2 + n)/(b*c^2*(2 + n
))

_______________________________________________________________________________________

Rubi [A]  time = 0.0469815, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.059 \[ \frac{(a c-b c x)^{n+2}}{b c^2 (n+2)}-\frac{2 a (a c-b c x)^{n+1}}{b c (n+1)} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x)*(a*c - b*c*x)^n,x]

[Out]

(-2*a*(a*c - b*c*x)^(1 + n))/(b*c*(1 + n)) + (a*c - b*c*x)^(2 + n)/(b*c^2*(2 + n
))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 11.877, size = 41, normalized size = 0.77 \[ - \frac{2 a \left (a c - b c x\right )^{n + 1}}{b c \left (n + 1\right )} + \frac{\left (a c - b c x\right )^{n + 2}}{b c^{2} \left (n + 2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x+a)*(-b*c*x+a*c)**n,x)

[Out]

-2*a*(a*c - b*c*x)**(n + 1)/(b*c*(n + 1)) + (a*c - b*c*x)**(n + 2)/(b*c**2*(n +
2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0269806, size = 43, normalized size = 0.81 \[ \frac{(b x-a) (a (n+3)+b (n+1) x) (c (a-b x))^n}{b (n+1) (n+2)} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x)*(a*c - b*c*x)^n,x]

[Out]

((c*(a - b*x))^n*(-a + b*x)*(a*(3 + n) + b*(1 + n)*x))/(b*(1 + n)*(2 + n))

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 47, normalized size = 0.9 \[ -{\frac{ \left ( -bcx+ac \right ) ^{n} \left ( bnx+an+bx+3\,a \right ) \left ( -bx+a \right ) }{b \left ({n}^{2}+3\,n+2 \right ) }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x+a)*(-b*c*x+a*c)^n,x)

[Out]

-(-b*c*x+a*c)^n*(b*n*x+a*n+b*x+3*a)*(-b*x+a)/b/(n^2+3*n+2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(-b*c*x + a*c)^n,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.22065, size = 78, normalized size = 1.47 \[ -\frac{{\left (a^{2} n - 2 \, a b x -{\left (b^{2} n + b^{2}\right )} x^{2} + 3 \, a^{2}\right )}{\left (-b c x + a c\right )}^{n}}{b n^{2} + 3 \, b n + 2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(-b*c*x + a*c)^n,x, algorithm="fricas")

[Out]

-(a^2*n - 2*a*b*x - (b^2*n + b^2)*x^2 + 3*a^2)*(-b*c*x + a*c)^n/(b*n^2 + 3*b*n +
 2*b)

_______________________________________________________________________________________

Sympy [A]  time = 1.77955, size = 245, normalized size = 4.62 \[ \begin{cases} a x \left (a c\right )^{n} & \text{for}\: b = 0 \\- \frac{a \log{\left (- \frac{a}{b} + x \right )}}{- a b c^{2} + b^{2} c^{2} x} - \frac{2 a}{- a b c^{2} + b^{2} c^{2} x} + \frac{b x \log{\left (- \frac{a}{b} + x \right )}}{- a b c^{2} + b^{2} c^{2} x} & \text{for}\: n = -2 \\- \frac{2 a \log{\left (- \frac{a}{b} + x \right )}}{b c} - \frac{x}{c} & \text{for}\: n = -1 \\- \frac{a^{2} n \left (a c - b c x\right )^{n}}{b n^{2} + 3 b n + 2 b} - \frac{3 a^{2} \left (a c - b c x\right )^{n}}{b n^{2} + 3 b n + 2 b} + \frac{2 a b x \left (a c - b c x\right )^{n}}{b n^{2} + 3 b n + 2 b} + \frac{b^{2} n x^{2} \left (a c - b c x\right )^{n}}{b n^{2} + 3 b n + 2 b} + \frac{b^{2} x^{2} \left (a c - b c x\right )^{n}}{b n^{2} + 3 b n + 2 b} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x+a)*(-b*c*x+a*c)**n,x)

[Out]

Piecewise((a*x*(a*c)**n, Eq(b, 0)), (-a*log(-a/b + x)/(-a*b*c**2 + b**2*c**2*x)
- 2*a/(-a*b*c**2 + b**2*c**2*x) + b*x*log(-a/b + x)/(-a*b*c**2 + b**2*c**2*x), E
q(n, -2)), (-2*a*log(-a/b + x)/(b*c) - x/c, Eq(n, -1)), (-a**2*n*(a*c - b*c*x)**
n/(b*n**2 + 3*b*n + 2*b) - 3*a**2*(a*c - b*c*x)**n/(b*n**2 + 3*b*n + 2*b) + 2*a*
b*x*(a*c - b*c*x)**n/(b*n**2 + 3*b*n + 2*b) + b**2*n*x**2*(a*c - b*c*x)**n/(b*n*
*2 + 3*b*n + 2*b) + b**2*x**2*(a*c - b*c*x)**n/(b*n**2 + 3*b*n + 2*b), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.22111, size = 153, normalized size = 2.89 \[ \frac{b^{2} n x^{2} e^{\left (n{\rm ln}\left (-b c x + a c\right )\right )} + b^{2} x^{2} e^{\left (n{\rm ln}\left (-b c x + a c\right )\right )} - a^{2} n e^{\left (n{\rm ln}\left (-b c x + a c\right )\right )} + 2 \, a b x e^{\left (n{\rm ln}\left (-b c x + a c\right )\right )} - 3 \, a^{2} e^{\left (n{\rm ln}\left (-b c x + a c\right )\right )}}{b n^{2} + 3 \, b n + 2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(-b*c*x + a*c)^n,x, algorithm="giac")

[Out]

(b^2*n*x^2*e^(n*ln(-b*c*x + a*c)) + b^2*x^2*e^(n*ln(-b*c*x + a*c)) - a^2*n*e^(n*
ln(-b*c*x + a*c)) + 2*a*b*x*e^(n*ln(-b*c*x + a*c)) - 3*a^2*e^(n*ln(-b*c*x + a*c)
))/(b*n^2 + 3*b*n + 2*b)